.TH "IEEE1394Reader" 3 "13 Oct 2009" "Version 2" "zebulon" \" -*- nroff -*-
.ad l
.nh
.SH NAME
IEEE1394Reader \- 
.SH SYNOPSIS
.br
.PP
.PP
Inherited by \fBiec61883Reader\fP, \fBpipeReader\fP, and \fBv4l2Reader\fP.
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBIEEE1394Reader\fP (int \fBchannel\fP=63, int frames=50, bool hdv=false)"
.br
.ti -1c
.RI "virtual \fB~IEEE1394Reader\fP ()"
.br
.ti -1c
.RI "virtual bool \fBStartThread\fP (void)=0"
.br
.ti -1c
.RI "virtual void \fBStopThread\fP (void)=0"
.br
.ti -1c
.RI "\fBFrame\fP * \fBGetFrame\fP (void)"
.br
.ti -1c
.RI "void \fBDoneWithFrame\fP (\fBFrame\fP *)"
.br
.ti -1c
.RI "int \fBGetDroppedFrames\fP (void)"
.br
.ti -1c
.RI "int \fBGetBadFrames\fP (void)"
.br
.ti -1c
.RI "int \fBGetOutQueueSize\fP (void)"
.br
.ti -1c
.RI "int \fBGetInQueueSize\fP (void)"
.br
.ti -1c
.RI "virtual bool \fBOpen\fP (void)=0"
.br
.ti -1c
.RI "virtual void \fBClose\fP (void)=0"
.br
.ti -1c
.RI "bool \fBWaitForAction\fP (int seconds=0)"
.br
.ti -1c
.RI "void \fBTriggerAction\fP ()"
.br
.ti -1c
.RI "virtual bool \fBStartReceive\fP (void)=0"
.br
.ti -1c
.RI "virtual void \fBStopReceive\fP (void)=0"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBFlush\fP (void)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "int \fBdroppedFrames\fP"
.br
.ti -1c
.RI "int \fBbadFrames\fP"
.br
.ti -1c
.RI "\fBFrame\fP * \fBcurrentFrame\fP"
.br
.RI "\fIa pointer to the frame which is currently been transmitted \fP"
.ti -1c
.RI "deque< \fBFrame\fP * > \fBinFrames\fP"
.br
.RI "\fIa list of empty frames \fP"
.ti -1c
.RI "deque< \fBFrame\fP * > \fBoutFrames\fP"
.br
.RI "\fIa list of already received frames \fP"
.ti -1c
.RI "int \fBchannel\fP"
.br
.RI "\fIthe iso channel we listen to (typically == 63) \fP"
.ti -1c
.RI "pthread_t \fBthread\fP"
.br
.RI "\fIcontains information about our thread after calling StartThread \fP"
.ti -1c
.RI "pthread_mutex_t \fBmutex\fP"
.br
.ti -1c
.RI "pthread_mutex_t \fBcondition_mutex\fP"
.br
.ti -1c
.RI "pthread_cond_t \fBcondition\fP"
.br
.ti -1c
.RI "bool \fBisRunning\fP"
.br
.RI "\fIA state variable for starting and stopping thread. \fP"
.ti -1c
.RI "bool \fBisHDV\fP"
.br
.RI "\fIIf this is handling DV or HDV. \fP"
.ti -1c
.RI "\fBHDVStreamParams\fP \fBhdvStreamParams\fP"
.br
.in -1c
.SH "Constructor & Destructor Documentation"
.PP 
.SS "IEEE1394Reader::IEEE1394Reader (int c = \fC63\fP, int bufSize = \fC50\fP, bool hdv = \fCfalse\fP)"Initializes the \fBIEEE1394Reader\fP object.
.PP
The object is initialized with port and channel number. These parameters define the interface card and the iso channel on which the camcorder sends its data.
.PP
The object contains a list of empty frames, which are allocated here. 50 frames (2 seconds) should be enough in most cases.
.PP
\fBParameters:\fP
.RS 4
\fIc\fP the iso channel number to use 
.br
\fIbufSize\fP the number of frames to allocate for the frames buffer 
.RE
.PP

.SS "IEEE1394Reader::~IEEE1394Reader ()\fC [virtual]\fP"Destroys the \fBIEEE1394Reader\fP object.
.PP
In particular, it deletes all frames in the inFrames and outFrames queues, as well as the one currently in use. Note that one or more frames may have been taken out of the queues by a user of the \fBIEEE1394Reader\fP class. 
.SH "Member Function Documentation"
.PP 
.SS "void IEEE1394Reader::DoneWithFrame (\fBFrame\fP * frame)"Put back a frame to the queue of available frames 
.SS "void IEEE1394Reader::Flush (void)\fC [protected]\fP"Throw away all currently available frames.
.PP
All frames in the outFrames queue are put back to the inFrames queue. Also the currentFrame is put back too. 
.SS "int IEEE1394Reader::GetBadFrames (void)"Return the number of incomplete frames since last call 
.SS "int IEEE1394Reader::GetDroppedFrames (void)"Return the number of dropped frames since last call 
.SS "\fBFrame\fP * IEEE1394Reader::GetFrame (void)"Fetches the next frame from the output queue
.PP
The outFrames contains a list of frames to be processed (saved, displayed) by the user of this class. Copy the first frame (actually only a pointer to it) and remove it from the queue.
.PP
\fBNote:\fP
.RS 4
If this returns NULL, wait some time (1/25 sec.) before calling it again.
.RE
.PP
\fBReturns:\fP
.RS 4
a pointer to the current frame, or NULL if no frames are in the queue 
.RE
.PP

.SH "Member Data Documentation"
.PP 
.SS "int \fBIEEE1394Reader::droppedFrames\fP\fC [protected]\fP"the number of frames that had to be thrown away because our inFrames queue did not contain available frames 
.SS "pthread_mutex_t \fBIEEE1394Reader::mutex\fP\fC [protected]\fP"this mutex protects capture related variables that could possibly accessed from two threads at the same time 

.SH "Author"
.PP 
Generated automatically by Doxygen for zebulon from the source code.
